1. Field of the Invention
The present invention is related to a device which compresses color still image data, for example, in accordance with a JPEG (Joint Photographic Expert Group) algorithm, and records the compressed image data in a recording medium and, also, to a device which reads the compressed image data from the recording medium and expands the compressed image data to reproduce the color still image.
2. Description of the Related Art
A standard algorithm, for the encoding of high resolution images and the transfer of that information through telecommunication transmission channels, has been recommended by the JPEG. In order to enable a large-scale data compression, the baseline process of the JPEG algorithm breaks down the original image data into components on a spatial frequency axis using a two-dimensional discrete cosine transformation (two-dimensional DCT) process. Thereafter, the data expressed on the spatial frequency axis is quantized by using a quantization table. The quantized data is then encoded using a Huffman table to generate compressed image data, which are recorded in a recording medium.
When the original image is reproduced from the compressed image data, an inverse process to that described above is performed. Namely, the compressed image data are decoded, are dequantized using the quantization table, and are then subjected to a two-dimensional inverse discrete cosine transformation (two-dimensional IDCT).
In the JPEG algorithm, a color image is compressed or expanded using the full-color mode in which 16,000,000 colors are used. Therefore, the JPEG algorithm can be applied to a wide range of image process systems, from a low resolution display system to a high resolution display system.
For example, when a color image of 256-color mode, generated by a personal computer, is compressed according to the JPEG algorithm, and then subsequently expanded to reproduce the color image of 256-color mode, a complicated process due to the difference between the full-color mode and the 256-color mode is required. In spite of the complicated process, the reproduced image obtained by the expansion process has a quality lower than the original image before compression, since, in the image compression process performed by the JPEG algorithm, some image information is lost.
Accordingly, an object of the present invention is to provide an image compression device by which a color image, generated by a mode in which the number of colors is less than that used in the image compression process performed by this image compression device, can be compressed without performing a complicated process and, further, the loss of image information occurring in the image compression process is minimized.
According to the present invention, there is provided an image compression device, a data reading processor, an image compression processor and a data recording processor.
The data reading processor reads pixel data, which is expressed by color data formed by combining a red (R) component, a green (G) component and a blue (B) component, and palette information, which is composed of a predetermined number of the color data. The image compression processor performs a compression process based on the pixel data to generate compressed image data. The data recording processor records the compressed image data and the palette information in a recording medium.
Further, according to the present invention, there is provided an image compression device, in which original image data and palette information are inputted so that the original image data is compressed, the palette information being composed of 256-color data, each of which is formed by combining a red component, a green component and a blue component, the original image data including color data which is allocated to one of the 256-color data, the device comprising an image processor, a transformation processor, a quantization processor, an encoding processor and a data recording processor.
The image processor processes the original image data to generate luminance data and color difference data. The transformation processor performs a two-dimensional discrete cosine transformation to the luminance data and the color difference data to generate DCT coefficients. The quantization processor quantizes the DCT coefficients to generate quantized DCT coefficients. The encoding processor encodes the quantized DCT coefficients to generate compressed image data. The data recording processor records the compressed image data and the palette information in a recording medium.
Another object of the present invention is to provide an image expansion device by which a color image, generated by a mode, in which the number of colors is less than that used in the image compression process performed by this image compression device, and then compressed and recorded in a recording medium, can be expanded without performing a complicated process and, further, the loss of image information occurring in the image expansion process is minimized.
According to the present invention, there is provided an image expansion device which expands compressed image data recorded in a recording medium, in which palette information, composed of a predetermined number of color data formed by combining an R component, a G component and a B component, is also recorded, the image expansion device comprising an image reading processor, an information reading processor, a pixel data reproducing processor and a color data selection processor.
The image reading processor reads the compressed image data from the recording medium. The information reading processor reads the palette information from the recording medium. The pixel data reproducing processor expands the compressed image data to reproduce pixel data. The color data selection processor selects one of the color data, which corresponds to the pixel data and is contained in the palette information, based on R, G and B components forming the pixel data obtained by the pixel data reproducing processor.